package server;

import java.util.HashMap;
import java.util.Map;

/**
 * Description: Mapper.
 *
 * @author Wengy
 * @since JDK 1.8
 * @since 1.0.0
 */
public class Mapper {
    
    private Map<String, Host> hostMap;
    
    public Map<String, Host> getHostMap() {
        return hostMap;
    }
    
    public void setHostMap(Map<String, Host> hostMap) {
        this.hostMap = hostMap;
    }
    
    public Mapper() {
        this.hostMap = new HashMap<>();
    }
    
    class Host {
        String appBase;
    
        public String getAppBase() {
            return appBase;
        }
    
        public void setAppBase(String appBase) {
            this.appBase = appBase;
        }
    
        public Host() {
            this.contextMap = new HashMap<>();
        }
    
        Map<String, Context> contextMap;
    
        public Map<String, Context> getContextMap() {
            return contextMap;
        }
    
        public void setContextMap(Map<String, Context> contextMap) {
            this.contextMap = contextMap;
        }
    }
    
    class Context {
        
        String contextName;
    
        public String getContextName() {
            return contextName;
        }
    
        public void setContextName(String contextName) {
            this.contextName = contextName;
        }
        
        Map<String, Wrapper> wrapperMap;
    
        public Map<String, Wrapper> getWrapperMap() {
            return wrapperMap;
        }
    
        public void setWrapperMap(Map<String, Wrapper> wrapperMap) {
            this.wrapperMap = wrapperMap;
        }
    
        public Context() {
            this.wrapperMap = new HashMap<>();
        }
    }
    
    class Wrapper {
    
        HttpServlet httpServlet;
    
        public HttpServlet getHttpServlet() {
            return httpServlet;
        }
    
        public void setHttpServlet(HttpServlet httpServlet) {
            this.httpServlet = httpServlet;
        }
    }
}
